import { Button, Form, Input } from 'antd';
import store from "../../../store";//哪个组件需要用到store的数据就在哪个组件引入
import {observer} from 'mobx-react'
const QueryAuthor = () => {
    const [form] = Form.useForm();
    const onFinish = (values) => {
        console.log('Finish:', values);
        store.Author.getQueryauthor({writerName:values.label})
    };
    return (
        <Form form={form} name="queryAuthor" layout="inline" onFinish={onFinish}>
            <Form.Item
                name="label"
            >
                <Input />
            </Form.Item>
            <Form.Item shouldUpdate>
                <Button
                    type="primary"
                    htmlType="submit"
                >
                    搜索
                </Button>
            </Form.Item>
        </Form>
    );
};

export default observer(QueryAuthor);

